package com.shuda.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;

/**
 * 角色实体类
 */
@TableName("sys_role")
@Schema(description = "角色实体")
public class RoleEntity {

    @TableId(type = IdType.AUTO)
    @Schema(description = "角色ID")
    private Long id;

    @Schema(description = "角色名称")
    private String roleName;

    @Schema(description = "角色编码")
    private String roleCode;

    @Schema(description = "角色描述")
    private String description;

    @Schema(description = "角色状态（0-禁用，1-启用）")
    private Integer status;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "删除标记（0-未删除，1-已删除）")
    private Integer deleted;

    /**
     *
     * 系统RoleEntity访问器
     * @param $params$
     * @return $returns$
     * @author ink
     * @Description: 显式提供roleName/roleCode访问器，便于Service层读取
     * @date 2025-11-09 11:00
     */
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getRoleName() { return roleName; }
    public void setRoleName(String roleName) { this.roleName = roleName; }

    public String getRoleCode() { return roleCode; }
    public void setRoleCode(String roleCode) { this.roleCode = roleCode; }

    /**
    *
    * 角色状态访问器
    * @param $params$
    * @return $returns$
    * @author ink
    * @Description: 显式提供status访问器，便于Service层读取/更新
    * @date 2025-11-09 23:36
    */
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }

    /**
    *
    * 删除标记访问器
    * @param $params$
    * @return $returns$
    * @author ink
    * @Description: 显式提供deleted访问器，避免Lombok缺失导致的编译错误
    * @date 2025-11-09 23:36
    */
    public Integer getDeleted() { return deleted; }
    public void setDeleted(Integer deleted) { this.deleted = deleted; }

    /** 获取排序 */
    public Integer getSort() { return sort; }
    /** 设置排序 */
    public void setSort(Integer sort) { this.sort = sort; }

    /** 获取创建人 */
    public String getCreateBy() { return createBy; }
    /** 设置创建人 */
    public void setCreateBy(String createBy) { this.createBy = createBy; }

    /** 获取创建时间 */
    public LocalDateTime getCreateTime() { return createTime; }
    /** 设置创建时间 */
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }

    /** 获取更新人 */
    public String getUpdateBy() { return updateBy; }
    /** 设置更新人 */
    public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }

    /** 获取更新时间 */
    public LocalDateTime getUpdateTime() { return updateTime; }
    /** 设置更新时间 */
    public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; }
}